package copier

import "encoding/json"

func Copy(source interface{}, dest interface{}) error {
	sourseBytes, err := json.Marshal(source)
	if err != nil {
		return err
	}
	err = json.Unmarshal(sourseBytes, dest)
	if err != nil {
		return err
	}
	return nil
}
